package com.zxm.ssm.mapper;

import com.zxm.ssm.entity.Inform;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface InformMapper {

    @Select("select * from inform")
    List<Inform> findAll();

    @Insert("insert into inform values(default, #{content}, #{createTime})")
    Integer addInform(Inform inform);

    @Update("update inform set content=#{content} ,createTime=#{createTime} where id=#{id}")
    Integer updateInform(Inform inform);

    @Delete("delete from inform where id=#{id}")
    Integer deleteInformById(@Param(value = "id") Integer id);

    @Select("select * from inform")
    List<Inform> selectInformAll();

    @Select("select * from inform where id=#{id}")
    Inform findInformById(@Param(value = "id")Integer id);
}
